package com.yanqu.backendweb.bean;

import com.yanqu.road.entity.enums.ePushGoodsType;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author duli
 * @version 1.0
 * @date 2020/10/13 9:56
 * @Description 道具大类
 */
@Data
public class Category {
    private int type;
    private String name;
    public static List<Category> toList() {
        List<Category> categoryList=new ArrayList<>();
        for (ePushGoodsType goodsType : ePushGoodsType.values()) {
            Category category=new Category();
            category.setType(goodsType.getValue());
            category.setName(goodsType.getName());
            categoryList.add(category);
        }
        return categoryList;
    }
}
